/* You can add custom styles here. */

// @import "plugins/numbered";
/*
 * Dark Mode Toggle
 * Copyright (c) 2015 instructure-react
 * Forked from Dan Abramov's personal blog
 * https://github.com/gaearon/overreacted.io/blob/master/src/components/Toggle.css
 * MIT License
**/

.js-toggle-wrapper {
    display: table;
    margin: 1rem 0 0 5px;
    flex: 1;
}

.js-toggle {
    touch-action: pan-x;
    display: inline-block;
    position: relative;
    cursor: pointer;
    background-color: transparent;
    border: 0;
    padding: 0;
    -webkit-touch-callout: none;
    user-select: none;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    -webkit-tap-highlight-color: transparent;
  }
  
  .js-toggle-screenreader-only {
    border: 0;
    clip: rect(0 0 0 0);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
  }
  
  .js-toggle-track {
    width: 60px;
    height: 34px;
    padding: 0;
    // border-radius: 30px;
    // background-color: hsl(222, 14%, 7%);
    // background-color: var(--body-background);
    transition: all 0.2s ease;
  }
  
  .js-toggle-track-check {
    position: absolute;
    width: 17px;
    height: 17px;
    left: 5px;
    top: 0px;
    bottom: 0px;
    margin-top: auto;
    margin-bottom: auto;
    line-height: 0;
    opacity: 0;
    transition: opacity 0.25s ease;
  }
  
  .js-toggle--checked .js-toggle-track-check {
    opacity: 1;
    transition: opacity 0.25s ease;
  }
  
  .js-toggle-track-x {
    position: absolute;
    width: 17px;
    height: 17px;
    right: 5px;
    top: 0px;
    bottom: 0px;
    margin-top: auto;
    margin-bottom: auto;
    line-height: 0;
    opacity: 1;
    transition: opacity 0.25s ease;
  }
  
  .js-toggle--checked .js-toggle-track-x {
    opacity: 0;
  }
  
  .js-toggle-thumb {
    position: absolute;
    top: 1px;
    left: 1px;
    width: 30px;
    height: 32px;
    // border-radius: 50%;
    // background-color: var(--gray-100);
    box-sizing: border-box;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1) 0ms;
    transform: translateX(0);
  }
  
  .js-toggle--checked .js-toggle-thumb {
    transform: translateX(26px);
    border-color: #19ab27;
  }
  
  // .js-toggle--focus .js-toggle-thumb {
  //   // box-shadow: 0px 0px 2px 3px rgb(255, 167, 196);
  //   box-shadow: 0px 0px 2px 3px #64CEAA;
  // }
  
  // .js-toggle:active .js-toggle-thumb {
  //   box-shadow: 0px 0px 5px 5px #64CEAA;
  //   // box-shadow: 0px 0px 5px 5px rgb(255, 167, 196);
  // }

  .magic {
      display: flex;
  }

  body.dark-mode, 
  body.dark-mode main * {
      background: rgb(45, 45, 45);
      color: #f5f5f5;
  }

$theme-light: (
    gray-100: #f8f9fa,
    gray-200: #e9ecef,
    body-background: white,
    body-font-color: black,
    color-link: #05b,
    color-visited-link: #8440f1,
    icon-filter: none,
);

$theme-dark: (
    gray-100: rgba(255, 255, 255, 0.1),
    gray-200: rgba(255, 255, 255, 0.2),
    body-background: #343a40,
    body-font-color: #e9ecef,
    color-link: #84b2ff,
    color-visited-link: #b88dff,
    icon-filter: brightness(0) invert(1),
);

[data-theme="dark"] {
    @each $name, $value in $theme-dark {
        --#{$name}: #{$value};
    }
}

[data-theme="light"] {
    @each $name, $value in $theme-light {
        --#{$name}: #{$value};
    }
}